// 基于template/src/views/{{appModules}}/{{pages@DEGRIDEXPVIEW}}/{{spinalCase page.codeName}}-hook.ts.hbs生成
import { QXEvent } from 'qx-util';
import {
	GridExpViewActionType,
	GridExpViewController,
	IGridExpViewAbility,
	IGridExpViewControllerParams,
	IParam,
	IViewEvent,
} from '@/core';
import {
	useGridExpViewProps,
	useGridExpViewBasic,
	useGridExpViewControllerParams,
    useGridExpViewAction,
} from '@/hooks/view/use-grid-exp-view';
import { model } from "./ibiz-order-grid-exp-view-model";

/**
 * 获取输入参数
 *
 * @export
 * @return {*}
 */
export function useProps() {
	return {
		...useGridExpViewProps()
	};
}

/**
 * 获取基础数据
 *
 * @export
 * @param {*} props
 * @return {*}
 */
export function useBasic(props: any) {
	return {
		...useGridExpViewBasic(model, props)
	};
}

/**
 * 获取行为
 *
 * @export
 */
export function useAction(controller: any) {
	return {
        ...useGridExpViewAction(controller)
    }
}

/**
 * 获取控制器
 *
 * @export
 * @param {IParam} props
 * @param {QXEvent<IViewEvent<GridExpViewActionType, IGridExpViewAbility>>} evt
 * @return {*}
 */
export function useController(
	props: IParam,
	evt: QXEvent<IViewEvent<GridExpViewActionType, IGridExpViewAbility>>
) {
	const params: IGridExpViewControllerParams<
		GridExpViewActionType,
		IGridExpViewAbility
	> = useGridExpViewControllerParams(model, props, evt);
	return new GridExpViewController(params);
}